﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="common/common::common('按钮管理')"/>
<script src="/static/base/menu/button/index.js" charset="utf-8"></script>
</head>
<body class="bg-color">
<div class="body_info">
    <div class="data_div">
        <!-- 按钮、搜索框 -->
        <div class="tool-bar-head">
            <div class="tool-bar-head-left">
                <button shiro:hasPermission="base:button:add"
                        class="layui-btn layui-btn-sm layui-btn-normal" onclick="saveSysMenu()">
                    <i class="layui-icon"></i>新增
                </button>
            </div>
            <div class="tool-bar-head-right">
                <form class="layui-form layui-form-pane" onsubmit="javascript:return false;">
                    <div class="layui-form-item query">
                        <label class="layui-form-label" style="padding-right: 0;">按钮名称</label>
                        <div class="layui-input-inline" style="margin-right:0;">
                            <input class="layui-input" id="name" name="name"
                                   onchange="javascript:$('#searchBtn').click();">
                        </div>
                        <button id="searchBtn" class="layui-btn layui-btn-normal" data-type="reload">
                            搜索
                        </button>
                    </div>
                </form>
            </div>
        </div>

        <!-- 表格 -->
        <div class="layui_table">
            <table class="layui-hide" id="layTable" lay-filter="sysMenuLay"></table>
            <div id="layPage"></div>
        </div>
        <input type="text" th:value="*{parentId}" id="parentId" name="parentId" style="visibility: hidden;">
    </div>

    <script type="text/html" id="visibleTemplate">
        <input type="checkbox" name="visible" value="{{d.id}}" lay-skin="switch" lay-text="显示|隐藏"
               lay-filter="visibleTemplate" {{ d.visible== '1' ? 'checked' : '' }}>
    </script>

    <!-- 操作工具栏 -->
    <script type="text/html" id="toolbarHandle">
        <a shiro:hasPermission="base:button:edit" class="tool-bar-btn edit-button" lay-event="edit">编辑</a>
        <a shiro:hasPermission="base:button:del" class="tool-bar-btn remove-button" lay-event="del">删除</a>
    </script>
</div>
</body>
</html>